﻿using Hangfire;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FrameWorkCore.HangFire.JobConfigs
{
    public class IIsNoRecovery
    {
        /// <summary>
        /// 将配置的id传出去
        /// </summary>
        /// <returns></returns>
        public static string IIsConfigInit()
        {
            RecurringJob.AddOrUpdate("IIsConfigInit", () => Console.Write($" StartTime: {DateTime.Now:yyyy-MM-dd HH:mm:ss} " ), "* 0/19 * * * ? ");
            RecurringJob.Trigger("IIsConfigInit");//立即执行

            return "IIsConfigInit";
        }

    }
}
